<layout name='Layout/public' />
<div class="col-sm-6 pull-right">
    <span class="btn btn-sm btn-info  pull-right" onclick="javascript:window.location.href = '?m={$mod}&a=add'">
        添加菜单
        <i class="icon-reply icon-only"></i>
    </span>
</div>
{:W('PageHeader',array('name'=>$action_name))}

<div class="row">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <div class="row">
            <div class="col-xs-12">

                <table id="sample-table-1" class="table table-hover">
                    <thead>
                        <tr>
                            <th width="50">排序</th>
                            <th  class="hidden-480" width="100">图标</th>
                            <th>名称</th>
                            <th >文件</th>
                            <th >方法</th>
                            <th width="50" >状态</th>
                            <th width="120">操作</th>
                        </tr>
                    </thead>
                    <form name="myform" action="" method="post">
                        <tbody>
                        <foreach name="data" item="v">
                            <tr <if condition="$v.status eq 1"> class="info"</if>>
                            <td>
                                <input class="col-xs-12" type="text" name="listorders[{$v.id}]" value="{$v.listorder}">
                            </td>

                            <td  class="hidden-480"><i class="ace-icon fa {$v.icon} bigger-200"></i></td>
                            <td>{:str_repeat("│        ",$v['level'])} <if condition="$v['level'] eq 0"><b>{$v.name}</b><else />├─{$v.name}</if></td>
                            <td >{$v.mod}</td>
                            <td >{$v.act}</td>
                            <td><eq name="v.status" value="1">显示<else/>隐藏</eq></td>

                            <td>
                                <div class="hidden-sm hidden-xs btn-group">
                                    <span class="btn btn-xs btn-success" onClick="window.location.href = '?m={$mod}&a=add&pid={$v.id}'">
                                        <i class="ace-icon fa fa-plus-circle bigger-120" ></i>
                                    </span>

                                    <span class="btn btn-xs btn-info" onclick="window.location.href = '?m={$mod}&a=add&id={$v.id}&pid={$v.pid}'">
                                        <i class="ace-icon fa fa-pencil bigger-120" ></i>
                                    </span>

                                    <span class="btn btn-xs btn-danger" onclick="alert_del('?m={$mod}&a=del&id={$v.id}', '确认要删除『{$v.name}』吗？')">
                                        <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                    </span>
                                </div>

                                <div class="hidden-md hidden-lg">
                                    <div class="inline position-relative">
                                        <span class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
                                            <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
                                        </span>

                                        <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="?m={$mod}&a=add&id={$v.id}&pid={$v.pid}" class="tooltip-info" data-rel="tooltip" title="View">
                                                    <span class="blue">
                                                        <i class="ace-icon fa fa-search-plus bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete" onclick="return alert_del('?m={$mod}&a=del&id={$v.id}', '确认要删除『{$v.name}』吗？');">
                                                    <span class="red">
                                                        <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td>
                            </tr>
                        </foreach>
                        <input type="hidden" name="dosubmit" value="submit">
                    </form>
                    </tbody>

                </table>


                <span class="btn btn-info" id="bootbox-confirm" onclick="myform.action = '?m={$mod}&a=listorder';
                        myform.submit()" >排序</span>


            </div><!-- /.span -->
        </div><!-- /.row -->




        <!-- PAGE CONTENT ENDS -->
    </div><!-- /.col -->
</div><!-- /.row -->

